home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / SoundSprocket.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  17.9 KB  |  532 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        SoundSprocket.a
  3. ;
  4. ;    Contains:    Games Sprockets: SoundSprocket interfaces
  5. ;
  6. ;    Version:    Technology:    NetSprocket 1.0
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1996-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SOUNDSPROCKET__') = 'UNDEFINED' THEN
  19. __SOUNDSPROCKET__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  28.     include 'QD3D.a'
  29.     ENDIF
  30.     IF &TYPE('__QD3DCAMERA__') = 'UNDEFINED' THEN
  31.     include 'QD3DCamera.a'
  32.     ENDIF
  33.  
  34. ; *******************************************************************************
  35. ; *    This stuff will be moved to Errors.h in a subsequent release
  36. ; *****************************************************************************
  37.  
  38.  
  39. kSSpInternalErr                    EQU        -30340
  40. kSSpVersionErr                    EQU        -30341
  41. kSSpCantInstallErr                EQU        -30342
  42. kSSpParallelUpVectorErr            EQU        -30343
  43. kSSpScaleToZeroErr                EQU        -30344
  44.  
  45. ; *******************************************************************************
  46. ; *    SndSetInfo/SndGetInfo Messages
  47. ; *****************************************************************************
  48.  
  49. ;     The siSSpCPULoadLimit = '3dll' selector for SndGetInfo fills in a value of    
  50. ;     type UInt32.                                                                
  51.  
  52.  
  53. kSSpSpeakerKind_Stereo            EQU        0
  54. kSSpSpeakerKind_Mono            EQU        1
  55. kSSpSpeakerKind_Headphones        EQU        2
  56.  
  57. ;     This is the data type is used with the SndGet/SetInfo selector                
  58. ;     siSSpSpeakerSetup = '3dst'                                                    
  59. SSpSpeakerSetupData        RECORD 0
  60. speakerKind                 ds.l    1                ; offset: $0 (0)        ;  Speaker configuration                
  61. speakerAngle             ds        Float32            ; offset: $4 (4)        ;  Angle formed by user and speakers    
  62. reserved0                 ds.l    1                ; offset: $8 (8)        ;  Reserved for future use -- set to 0    
  63. reserved1                 ds.l    1                ; offset: $C (12)        ;  Reserved for future use -- set to 0    
  64. sizeof                     EQU *                    ; size:   $10 (16)
  65.                         ENDR
  66.  
  67. kSSpMedium_Air                    EQU        0
  68. kSSpMedium_Water                EQU        1
  69.  
  70.  
  71. kSSpSourceMode_Unfiltered        EQU        0                    ; No filtering applied                    
  72. kSSpSourceMode_Localized        EQU        1                    ; Localized by source position            
  73. kSSpSourceMode_Ambient            EQU        2                    ; Coming from all around                
  74. kSSpSourceMode_Binaural            EQU        3                    ; Already binaurally localized            
  75.  
  76. SSpLocationData            RECORD 0
  77. elevation                 ds        Float32            ; offset: $0 (0)        ;  Angle of the meridian -- pos is up    
  78. azimuth                     ds        Float32            ; offset: $4 (4)        ;  Angle of the parallel -- pos is left    
  79. distance                 ds        Float32            ; offset: $8 (8)        ;  Distance between source and listener    
  80. projectionAngle             ds        Float32            ; offset: $C (12)        ;  Cos(angle) between cone and listener    
  81. sourceVelocity             ds        Float32            ; offset: $10 (16)        ;  Speed of source toward the listener    
  82. listenerVelocity         ds        Float32            ; offset: $14 (20)        ; Speed of listener toward the source    
  83. sizeof                     EQU *                    ; size:   $18 (24)
  84.                         ENDR
  85. SSpVirtualSourceData    RECORD 0
  86. attenuation                 ds        Float32            ; offset: $0 (0)        ;  Attenuation factor                    
  87. location                 ds        SSpLocationData ; offset: $4 (4)        ;  Location of virtual source            
  88. sizeof                     EQU *                    ; size:   $1C (28)
  89.                         ENDR
  90. ;     This is the data type is used with the SndGet/SetInfo selector                
  91. ;     siSSpLocalization = '3dif'                                                    
  92. SSpLocalizationData        RECORD 0
  93. cpuLoad                     ds.l    1                ; offset: $0 (0)        ;  CPU load vs. quality -- 0 is best    
  94. medium                     ds.l    1                ; offset: $4 (4)        ;  Medium for sound propagation            
  95. humidity                 ds        Float32            ; offset: $8 (8)        ;  Humidity when medium is air            
  96. roomSize                 ds        Float32            ; offset: $C (12)        ;  Reverb model -- distance bet. walls    
  97. roomReflectivity         ds        Float32            ; offset: $10 (16)        ; Reverb model -- bounce attenuation    
  98. reverbAttenuation         ds        Float32            ; offset: $14 (20)        ; Reverb model -- mix level            
  99. sourceMode                 ds.l    1                ; offset: $18 (24)        ;  Type of filtering to apply            
  100. referenceDistance         ds        Float32            ; offset: $1C (28)        ; Nominal distance for recording        
  101. coneAngleCos             ds        Float32            ; offset: $20 (32)        ;  Cos(angle/2) of attenuation cone        
  102. coneAttenuation             ds        Float32            ; offset: $24 (36)        ;  Attenuation outside the cone            
  103. currentLocation             ds        SSpLocationData ; offset: $28 (40)        ;  Location of the sound                 
  104. reserved0                 ds.l    1                ; offset: $40 (64)        ;  Reserved for future use -- set to 0    
  105. reserved1                 ds.l    1                ; offset: $44 (68)        ;  Reserved for future use -- set to 0    
  106. reserved2                 ds.l    1                ; offset: $48 (72)        ;  Reserved for future use -- set to 0    
  107. reserved3                 ds.l    1                ; offset: $4C (76)        ;  Reserved for future use -- set to 0    
  108. virtualSourceCount         ds.l    1                ; offset: $50 (80)        ; Number of reflections                
  109. virtualSource             ds.b    4 * SSpVirtualSourceData.sizeof ; offset: $54 (84) ; The reflections                        
  110. sizeof                     EQU *                    ; size:   $C4 (196)
  111.                         ENDR
  112.     IF TARGET_CPU_PPC THEN
  113. ; *******************************************************************************
  114. ; *    Global functions
  115. ; *****************************************************************************
  116.  
  117. ;
  118. ; extern OSStatus SSpConfigureSpeakerSetup(SSpEventProcPtr inEventProcPtr)
  119. ;
  120.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  121.         IMPORT_CFM_FUNCTION SSpConfigureSpeakerSetup
  122.     ENDIF
  123.  
  124. ;
  125. ; extern OSStatus SSpGetCPULoadLimit(UInt32 *outCPULoadLimit)
  126. ;
  127.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  128.         IMPORT_CFM_FUNCTION SSpGetCPULoadLimit
  129.     ENDIF
  130.  
  131.  
  132. ; *******************************************************************************
  133. ; *    Routines for Maniulating Listeners
  134. ; *****************************************************************************
  135.  
  136.  
  137.  
  138. ;
  139. ; extern OSStatus SSpListener_New(SSpListenerReference *outListenerReference)
  140. ;
  141.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  142.         IMPORT_CFM_FUNCTION SSpListener_New
  143.     ENDIF
  144.  
  145. ;
  146. ; extern OSStatus SSpListener_Dispose(SSpListenerReference inListenerReference)
  147. ;
  148.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  149.         IMPORT_CFM_FUNCTION SSpListener_Dispose
  150.     ENDIF
  151.  
  152. ;
  153. ; extern OSStatus SSpListener_SetTransform(SSpListenerReference inListenerReference, const TQ3Matrix4x4 *inTransform)
  154. ;
  155.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  156.         IMPORT_CFM_FUNCTION SSpListener_SetTransform
  157.     ENDIF
  158.  
  159. ;
  160. ; extern OSStatus SSpListener_GetTransform(SSpListenerReference inListenerReference, TQ3Matrix4x4 *outTransform)
  161. ;
  162.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  163.         IMPORT_CFM_FUNCTION SSpListener_GetTransform
  164.     ENDIF
  165.  
  166. ;
  167. ; extern OSStatus SSpListener_SetPosition(SSpListenerReference inListenerReference, const TQ3Point3D *inPosition)
  168. ;
  169.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  170.         IMPORT_CFM_FUNCTION SSpListener_SetPosition
  171.     ENDIF
  172.  
  173. ;
  174. ; extern OSStatus SSpListener_GetPosition(SSpListenerReference inListenerReference, TQ3Point3D *outPosition)
  175. ;
  176.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  177.         IMPORT_CFM_FUNCTION SSpListener_GetPosition
  178.     ENDIF
  179.  
  180. ;
  181. ; extern OSStatus SSpListener_SetOrientation(SSpListenerReference inListenerReference, const TQ3Vector3D *inOrientation)
  182. ;
  183.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  184.         IMPORT_CFM_FUNCTION SSpListener_SetOrientation
  185.     ENDIF
  186.  
  187. ;
  188. ; extern OSStatus SSpListener_GetOrientation(SSpListenerReference inListenerReference, TQ3Vector3D *outOrientation)
  189. ;
  190.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  191.         IMPORT_CFM_FUNCTION SSpListener_GetOrientation
  192.     ENDIF
  193.  
  194. ;
  195. ; extern OSStatus SSpListener_SetUpVector(SSpListenerReference inListenerReference, const TQ3Vector3D *inUpVector)
  196. ;
  197.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  198.         IMPORT_CFM_FUNCTION SSpListener_SetUpVector
  199.     ENDIF
  200.  
  201. ;
  202. ; extern OSStatus SSpListener_GetUpVector(SSpListenerReference inListenerReference, TQ3Vector3D *outUpVector)
  203. ;
  204.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  205.         IMPORT_CFM_FUNCTION SSpListener_GetUpVector
  206.     ENDIF
  207.  
  208. ;
  209. ; extern OSStatus SSpListener_SetCameraPlacement(SSpListenerReference inListenerReference, const TQ3CameraPlacement *inCameraPlacement)
  210. ;
  211.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  212.         IMPORT_CFM_FUNCTION SSpListener_SetCameraPlacement
  213.     ENDIF
  214.  
  215. ;
  216. ; extern OSStatus SSpListener_GetCameraPlacement(SSpListenerReference inListenerReference, TQ3CameraPlacement *outCameraPlacement)
  217. ;
  218.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  219.         IMPORT_CFM_FUNCTION SSpListener_GetCameraPlacement
  220.     ENDIF
  221.  
  222. ;
  223. ; extern OSStatus SSpListener_SetVelocity(SSpListenerReference inListenerReference, const TQ3Vector3D *inVelocity)
  224. ;
  225.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  226.         IMPORT_CFM_FUNCTION SSpListener_SetVelocity
  227.     ENDIF
  228.  
  229. ;
  230. ; extern OSStatus SSpListener_GetVelocity(SSpListenerReference inListenerReference, TQ3Vector3D *outVelocity)
  231. ;
  232.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  233.         IMPORT_CFM_FUNCTION SSpListener_GetVelocity
  234.     ENDIF
  235.  
  236. ;
  237. ; extern OSStatus SSpListener_GetActualVelocity(SSpListenerReference inListenerReference, TQ3Vector3D *outVelocity)
  238. ;
  239.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  240.         IMPORT_CFM_FUNCTION SSpListener_GetActualVelocity
  241.     ENDIF
  242.  
  243. ;
  244. ; extern OSStatus SSpListener_SetMedium(SSpListenerReference inListenerReference, UInt32 inMedium, float inHumidity)
  245. ;
  246.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  247.         IMPORT_CFM_FUNCTION SSpListener_SetMedium
  248.     ENDIF
  249.  
  250. ;
  251. ; extern OSStatus SSpListener_GetMedium(SSpListenerReference inListenerReference, UInt32 *outMedium, float *outHumidity)
  252. ;
  253.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  254.         IMPORT_CFM_FUNCTION SSpListener_GetMedium
  255.     ENDIF
  256.  
  257. ;
  258. ; extern OSStatus SSpListener_SetReverb(SSpListenerReference inListenerReference, float inRoomSize, float inRoomReflectivity, float inReverbAttenuation)
  259. ;
  260.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  261.         IMPORT_CFM_FUNCTION SSpListener_SetReverb
  262.     ENDIF
  263.  
  264. ;
  265. ; extern OSStatus SSpListener_GetReverb(SSpListenerReference inListenerReference, float *outRoomSize, float *outRoomReflectivity, float *outReverbAttenuation)
  266. ;
  267.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION SSpListener_GetReverb
  269.     ENDIF
  270.  
  271. ;
  272. ; extern OSStatus SSpListener_SetMetersPerUnit(SSpListenerReference inListenerReference, float inMetersPerUnit)
  273. ;
  274.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  275.         IMPORT_CFM_FUNCTION SSpListener_SetMetersPerUnit
  276.     ENDIF
  277.  
  278. ;
  279. ; extern OSStatus SSpListener_GetMetersPerUnit(SSpListenerReference inListenerReference, float *outMetersPerUnit)
  280. ;
  281.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  282.         IMPORT_CFM_FUNCTION SSpListener_GetMetersPerUnit
  283.     ENDIF
  284.  
  285.  
  286. ; *******************************************************************************
  287. ; *    Routines for Manipulating Sources
  288. ; *****************************************************************************
  289.  
  290.  
  291.  
  292. ;
  293. ; extern OSStatus SSpSource_New(SSpSourceReference *outSourceReference)
  294. ;
  295.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION SSpSource_New
  297.     ENDIF
  298.  
  299. ;
  300. ; extern OSStatus SSpSource_Dispose(SSpSourceReference inSourceReference)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION SSpSource_Dispose
  304.     ENDIF
  305.  
  306. ;
  307. ; extern OSStatus SSpSource_CalcLocalization(SSpSourceReference inSourceReference, SSpListenerReference inListenerReference, SSpLocalizationData *out3DInfo)
  308. ;
  309.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  310.         IMPORT_CFM_FUNCTION SSpSource_CalcLocalization
  311.     ENDIF
  312.  
  313. ;
  314. ; extern OSStatus SSpSource_SetTransform(SSpSourceReference inSourceReference, const TQ3Matrix4x4 *inTransform)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  317.         IMPORT_CFM_FUNCTION SSpSource_SetTransform
  318.     ENDIF
  319.  
  320. ;
  321. ; extern OSStatus SSpSource_GetTransform(SSpSourceReference inSourceReference, TQ3Matrix4x4 *outTransform)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION SSpSource_GetTransform
  325.     ENDIF
  326.  
  327. ;
  328. ; extern OSStatus SSpSource_SetPosition(SSpSourceReference inSourceReference, const TQ3Point3D *inPosition)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  331.         IMPORT_CFM_FUNCTION SSpSource_SetPosition
  332.     ENDIF
  333.  
  334. ;
  335. ; extern OSStatus SSpSource_GetPosition(SSpSourceReference inSourceReference, TQ3Point3D *outPosition)
  336. ;
  337.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  338.         IMPORT_CFM_FUNCTION SSpSource_GetPosition
  339.     ENDIF
  340.  
  341. ;
  342. ; extern OSStatus SSpSource_SetOrientation(SSpSourceReference inSourceReference, const TQ3Vector3D *inOrientation)
  343. ;
  344.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  345.         IMPORT_CFM_FUNCTION SSpSource_SetOrientation
  346.     ENDIF
  347.  
  348. ;
  349. ; extern OSStatus SSpSource_GetOrientation(SSpSourceReference inSourceReference, TQ3Vector3D *outOrientation)
  350. ;
  351.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  352.         IMPORT_CFM_FUNCTION SSpSource_GetOrientation
  353.     ENDIF
  354.  
  355. ;
  356. ; extern OSStatus SSpSource_SetUpVector(SSpSourceReference inSourceReference, const TQ3Vector3D *inUpVector)
  357. ;
  358.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION SSpSource_SetUpVector
  360.     ENDIF
  361.  
  362. ;
  363. ; extern OSStatus SSpSource_GetUpVector(SSpSourceReference inSourceReference, TQ3Vector3D *outUpVector)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  366.         IMPORT_CFM_FUNCTION SSpSource_GetUpVector
  367.     ENDIF
  368.  
  369. ;
  370. ; extern OSStatus SSpSource_SetCameraPlacement(SSpSourceReference inSourceReference, const TQ3CameraPlacement *inCameraPlacement)
  371. ;
  372.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  373.         IMPORT_CFM_FUNCTION SSpSource_SetCameraPlacement
  374.     ENDIF
  375.  
  376. ;
  377. ; extern OSStatus SSpSource_GetCameraPlacement(SSpSourceReference inSourceReference, TQ3CameraPlacement *outCameraPlacement)
  378. ;
  379.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  380.         IMPORT_CFM_FUNCTION SSpSource_GetCameraPlacement
  381.     ENDIF
  382.  
  383. ;
  384. ; extern OSStatus SSpSource_SetVelocity(SSpSourceReference inSourceReference, const TQ3Vector3D *inVelocity)
  385. ;
  386.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION SSpSource_SetVelocity
  388.     ENDIF
  389.  
  390. ;
  391. ; extern OSStatus SSpSource_GetVelocity(SSpSourceReference inSourceReference, TQ3Vector3D *outVelocity)
  392. ;
  393.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  394.         IMPORT_CFM_FUNCTION SSpSource_GetVelocity
  395.     ENDIF
  396.  
  397. ;
  398. ; extern OSStatus SSpSource_GetActualVelocity(SSpSourceReference inSourceReference, TQ3Vector3D *outVelocity)
  399. ;
  400.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  401.         IMPORT_CFM_FUNCTION SSpSource_GetActualVelocity
  402.     ENDIF
  403.  
  404. ;
  405. ; extern OSStatus SSpSource_SetCPULoad(SSpSourceReference inSourceReference, UInt32 inCPULoad)
  406. ;
  407.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  408.         IMPORT_CFM_FUNCTION SSpSource_SetCPULoad
  409.     ENDIF
  410.  
  411. ;
  412. ; extern OSStatus SSpSource_GetCPULoad(SSpSourceReference inSourceReference, UInt32 *outCPULoad)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION SSpSource_GetCPULoad
  416.     ENDIF
  417.  
  418. ;
  419. ; extern OSStatus SSpSource_SetMode(SSpSourceReference inSourceReference, UInt32 inMode)
  420. ;
  421.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  422.         IMPORT_CFM_FUNCTION SSpSource_SetMode
  423.     ENDIF
  424.  
  425. ;
  426. ; extern OSStatus SSpSource_GetMode(SSpSourceReference inSourceReference, UInt32 *outMode)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION SSpSource_GetMode
  430.     ENDIF
  431.  
  432. ;
  433. ; extern OSStatus SSpSource_SetReferenceDistance(SSpSourceReference inSourceReference, float inReferenceDistance)
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  436.         IMPORT_CFM_FUNCTION SSpSource_SetReferenceDistance
  437.     ENDIF
  438.  
  439. ;
  440. ; extern OSStatus SSpSource_GetReferenceDistance(SSpSourceReference inSourceReference, float *outReferenceDistance)
  441. ;
  442.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  443.         IMPORT_CFM_FUNCTION SSpSource_GetReferenceDistance
  444.     ENDIF
  445.  
  446. ;
  447. ; extern OSStatus SSpSource_SetSize(SSpSourceReference inSourceReference, float inLength, float inWidth, float inHeight)
  448. ;
  449.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  450.         IMPORT_CFM_FUNCTION SSpSource_SetSize
  451.     ENDIF
  452.  
  453. ;
  454. ; extern OSStatus SSpSource_GetSize(SSpSourceReference inSourceReference, float *outLength, float *outWidth, float *outHeight)
  455. ;
  456.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  457.         IMPORT_CFM_FUNCTION SSpSource_GetSize
  458.     ENDIF
  459.  
  460. ;
  461. ; extern OSStatus SSpSource_SetAngularAttenuation(SSpSourceReference inSourceReference, float inConeAngle, float inConeAttenuation)
  462. ;
  463.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  464.         IMPORT_CFM_FUNCTION SSpSource_SetAngularAttenuation
  465.     ENDIF
  466.  
  467. ;
  468. ; extern OSStatus SSpSource_GetAngularAttenuation(SSpSourceReference inSourceReference, float *outConeAngle, float *outConeAttenuation)
  469. ;
  470.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  471.         IMPORT_CFM_FUNCTION SSpSource_GetAngularAttenuation
  472.     ENDIF
  473.  
  474.     ENDIF    ; TARGET_CPU_PPC
  475.  
  476. ; *******************************************************************************
  477. ; *    MORE LATE-BREAKING NEWS
  478. ; *
  479. ; *    The SndGetInfo selector siSSpFilterVersion and datatype SSpFilterVersionData
  480. ; *    have been removed in favor of an alternate way of accessing filter version
  481. ; *    information.  The following function may be used for this purpose.
  482. ; *******************************************************************************
  483. ;// **************************** GetSSpFilterVersion ****************************
  484. ;// Finds the manufacturer and version number of the SoundSprocket filter that
  485. ;// may be installed.  inManufacturer should be the manufacturer code specified
  486. ;// at the installation time, which may be zero to allow any manufacturer.
  487. ;// If no error is encountered, outManufacturer is set to the actual manufacturer
  488. ;// code and outMajorVersion and outMinorVersion are set to the component
  489. ;// specification level and manufacturer's implementation revision, respectively.
  490. ;OSStatus GetSSpFilterVersion(
  491. ;    OSType                    inManufacturer,
  492. ;    OSType*                    outManufacturer,
  493. ;    UInt32*                    outMajorVersion,
  494. ;    UInt32*                    outMinorVersion)
  495. ;{
  496. ;    OSStatus                err;
  497. ;    ComponentDescription    description;
  498. ;    Component                componentRef;
  499. ;    UInt32                    vers;
  500. ;    
  501. ;    // Set up the component description
  502. ;    description.componentType            = kSoundEffectsType;
  503. ;    description.componentSubType        = kSSpLocalizationSubType;
  504. ;    description.componentManufacturer    = inManufacturer;
  505. ;    description.componentFlags            = 0;        
  506. ;    description.componentFlagsMask        = 0;    
  507. ;    
  508. ;    // Find a component matching the description
  509. ;    componentRef = FindNextComponent(nil, &description);
  510. ;    if (componentRef == nil)  return couldntGetRequiredComponent;
  511. ;    
  512. ;    // Get the component description (for the manufacturer code)
  513. ;    err = GetComponentInfo(componentRef, &description, nil, nil, nil);
  514. ;    if (err != noErr)  return err;
  515. ;    
  516. ;    // Get the version composite
  517. ;    vers = (UInt32) GetComponentVersion((ComponentInstance) componentRef);
  518. ;    
  519. ;    // Return the results
  520. ;    *outManufacturer = description.componentManufacturer;
  521. ;    *outMajorVersion = HiWord(vers);
  522. ;    *outMinorVersion = LoWord(vers);
  523. ;    
  524. ;    return noErr;
  525. ;}
  526. ;******************************************************************************
  527.  
  528.  
  529.  
  530.     ENDIF ; __SOUNDSPROCKET__ 
  531.  
  532.